<%@ page contentType="text/html;charset=UTF-8" language="java" pageEncoding="UTF-8" %>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %>

<c:choose>
    <c:when test="${sessionScope.UserInfo==null}">
        <c:set var="UserSession" value="${sessionScope.AdminInfo}" />
        <c:set var="ConsoleUrl" value="/admin/console" />
    </c:when>
    <c:otherwise>
        <c:set var="UserSession" value="${sessionScope.UserInfo}" />
        <c:set var="ConsoleUrl" value="/console" />
    </c:otherwise>
</c:choose>

<!DOCTYPE html>
<html lang="zh-CN">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1">
    <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
    <meta name="description" content="">
    <meta name="keywords" content="">
    <meta name="author" content="YunDao" >

    <meta property="og:site_name" content="">
    <meta property="og:title" content="">
    <meta property="og:description" content="">
    <meta property="og:type" content="website">
    <meta property="og:image" content="">
    <meta property="og:url" content="">

    <title>云道</title>

    <link rel="stylesheet" href="/static/css-lib/bootstrap.min.css" />
    <link rel="stylesheet" href="/static/css-cus/Home.css" />
</head>
<body class="body-offcanvas">
    <header class="clearfix">
        <nav class="navbar navbar-default" role="navigation">
            <div class="container-fluid">
                <div class="navbar-header">
                    <!-- logo -->
                    <a href="#">
                        <img src="/static/images/yundao-logo-black(309×309).png" class="img-circle logo-box logo-size" alt="云道">
                    </a>
                    <span class="logo-text">YunDao</span>
                    <!-- 折叠按钮 -->
                    <button type="button" class="navbar-toggle offcanvas-toggle pull-right" data-toggle="offcanvas" data-target="#js-bootstrap-offcanvas" style="float:left;">
                        <span class="sr-only">Toggle navigation</span>
                        <span>
                              <span class="icon-bar"></span>
                              <span class="icon-bar"></span>
                              <span class="icon-bar"></span>
                            </span>
                    </button>
                </div>
                <div class="navbar-offcanvas navbar-offcanvas-touch" id="js-bootstrap-offcanvas">
                    <ul class="nav navbar-nav">
                        <li class="active">
                            <a href="/">首页</a>
                        </li>
                        <li>
                            <a href="#">关于我们</a>
                        </li>
                        <li>
                            <a href="#">帮助</a>
                        </li>
                    </ul>

                    <ul class="nav navbar-nav navbar-right">
                        <li>
                            <c:choose>
                                <c:when test="${UserSession==null}">
                                    <a href="/login">登录</a>
                                </c:when>
                                <c:otherwise>
                                    <a href="<c:out value="${ConsoleUrl}" />">返回控制台</a>
                                </c:otherwise>
                            </c:choose>
                        </li>
                    </ul>
                </div>
            </div>
        </nav>
    </header>

    <script src="/static/js-lib/jquery-3.4.1.min.js"></script>
    <script src="/static/js-cus/Home.js"></script>
</body>
</html>